<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link rel="stylesheet" href="../css/icons-extra.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<link rel="stylesheet" href="../css/sub-my.css" />
		<style type="text/css">
			[v-cloak] {
				display: none !important;
			}
		</style>
	</head>

	<body>
		<div id="refreshContainer">
			<header class="mui-bar mui-bar-nav">
				<h1 class="mui-title">我的</h1>
			</header>
			<div class="mui-content" id="my-info">
				<div class="mui-card-header mui-card-media" id="my-intro" style="background-image:url(../images/submy_bg.jpeg); background-size: cover;">
					<div class="mui-media" id="my-intro-img">
						<img class="mui-media-object" src="../images/qq.png">
						<div class="mui-media-body" id="loginname" style="color: #4b5dbb;"></div>
					</div>
				</div>
				<div class="info">
					<ul class="mui-table-view">
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="btnupdate">
								<div class="mui-col-xs-9">
									<span class="mui-icon iconfont icon-ziliao"></span>&nbsp;&nbsp;个人信息
								</div>
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="btnmanagement">
								<div class="mui-col-xs-9">
									<span class="mui-icon iconfont icon-guanli1"></span>&nbsp;&nbsp;账号管理
								</div>
							</a>
						</li>
						<!--<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="btnConferencemanagement">
								<div class="mui-col-xs-9">
									<span class="mui-icon mui-icon-extra mui-icon-extra-peoples" style="font-size: 18px;"></span>&nbsp;&nbsp;会议管理
								</div>
							</a>
						</li>-->
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="btnAuditmanagement">
								<div class="mui-col-xs-9">
									<span class="mui-icon mui-icon-extra mui-icon-extra-topic" style="font-size: 18px;"></span>&nbsp;&nbsp;审核管理
								</div>
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="" id="btnAbout">
								<div class="mui-col-xs-9">
									<span class="mui-icon mui-icon-info" style="font-size: 18px;"></span>&nbsp;&nbsp;关于
								</div>
							</a>
						</li>
					</ul>
					<div class="title"></div>
					<ul class="mui-table-view">
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="btnloginout">
								<div class="mui-col-xs-9">
									<span class="mui-icon iconfont icon-zhuxiao_logout10"></span>&nbsp;&nbsp;注销
								</div>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</body>

</html>
<script type="text/javascript" src="../js/mui.min.js"></script>
<script type="text/javascript" src="../js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="../js/vue.min.js"></script>
<script type="text/javascript" src="../js/config.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/localStorage.js"></script>
<script type="text/javascript">
	var apploginuser = null;
	var flag = true;

	mui.init();

	mui.plusReady(function() {
		viewspages = plus.webview.all();
		render();

		//	个人资料修改
		mui('body').on('tap', '#btnupdate', function() {
			if(!apploginuser) {
				mui.toast('当前登陆账户数据异常')
				return;
			}
			mui.openWindow({
				url: '/html/my-center.html',
				id: 'my-center',
				createNew: false,
				extras: {
					'info': apploginuser,
				},
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 300
				},
				waiting: {
					autoShow: false,
					title: '正在加载...'
				}
			})
		});

		//	账号管理
		mui('body').on('tap', '#btnmanagement', function() {
			if(!apploginuser) {
				mui.toast('当前登陆账户数据异常');
				return;
			}
			mui.openWindow({
				url: '/html/my-modify.html',
				id: 'my-modify',
				createNew: false,
				extras: {
					'info': apploginuser,
				},
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 300
				},
				waiting: {
					autoShow: false,
					title: '正在加载...'
				}
			})
		});
		
		//	会议管理
		mui('body').on('tap', '#btnConferencemanagement', function() {
			//mui.toast('审核管理');
			mui.openWindow({
				url: '/html/my-conference-manage.html',
				id: 'my-conference-manage',
				createNew: false,
				/*extras: {
					'info': apploginuser,
				},*/
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 300
				},
				waiting: {
					autoShow: false,
					title: '正在加载...'
				}
			})
		});

		//	审核管理
		mui('body').on('tap', '#btnAuditmanagement', function() {
			//mui.toast('审核管理');
			mui.openWindow({
				url: '/html/my-auditmanage.html',
				id: 'my-auditmanage',
				createNew: false,
				/*extras: {
					'info': apploginuser,
				},*/
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 300
				},
				waiting: {
					autoShow: false,
					title: '正在加载...'
				}
			})
		});

		//	关于
		mui('body').on('tap', '#btnAbout', function() {
			//	获取本地应用资源版本号
			plus.runtime.getProperty(plus.runtime.appid, function(info) {
				var appVer = info.version;
				mui.toast('当前版本:' + appVer);
			});
		});

		//	注销登录
		mui('body').on('tap', '#btnloginout', function() {
			mui.confirm('是否注销登录，请确认！', '友情提示', ['确认', '取消'], function(e) {
				if(e.index == 0) {
					for(var i = 1; i < viewspages.length - 1; i++) {
						plus.webview.close(viewspages[i].id); //删除所有已加载页面。待下次登录时重新加载页面。数据重新加载
					}

					localStorageFunc.set("token", '');
					localStorageFunc.set("applogininfo", '');
					/*mui.openWindow({
						url: '/login.html',
						id: 'login',
						createNew: false,
						show: {
							autoShow: true,
							aniShow: 'slide-in-right',
							duration: 300
						}
					})*/
				}
			});
		});

	});

	function render() {
		apploginuser = localStorageFunc.get('applogininfo');
		$('#loginname').text(apploginuser.name);
		$("#btnupdate").attr('data-userid', apploginuser);
	}

	window.addEventListener("myfresh", function(e) {

	});
</script>